//  医院图标弹窗
function hospitalInfoContent(baseinfo) {
  for (let key in baseinfo) {
    // console.log(baseinfo[key])
    if (baseinfo[key] == null || baseinfo[key] == "") {
      baseinfo[key] = "暂无"
    }
  }
  return `
  <div style="margin:5px;">
    <div>
      <span>医院名称：</span>
      <span>` +
    baseinfo.name +
    `</span>
    </div>
    <div>
      <span>医院英文名称：</span>
      <span>` +
    baseinfo.englishName +
    `</span>
    </div>
    <div>
      <span>联系人1：</span>
      <span> ` +
    baseinfo.contactName1 +
    `</span>
    </div>
    
    <div>
      <span>联系人2：</span>
      <span>` +
    baseinfo.contactName2 +
    `</span></span>
    </div>
    <div>
      <span>联系电话1：</span>
      <span>` +
    baseinfo.tel1 +
    `</span></span>
    </div>
    <div>
      <span>联系电话2：</span>
      <span>` +
    baseinfo.tel2 +
    `</span></span>
    </div>
    <div>
      <span>医院地址：</span>
      <span>` +
    baseinfo.address +
    `</span></span>
    </div>
  </div>
`
}
//  场馆图标弹窗
function venueContent(baseinfo) {
  let color = ""
  // console.log(baseinfo)
  for (let key in baseinfo.venueDetail[0]) {
    // console.log(baseinfo.venueDetail[0][key])
    if (baseinfo.venueDetail[0][key] == null || baseinfo.venueDetail[0][key] == "") {
      baseinfo.venueDetail[0][key] = "暂无"
    }
    if (baseinfo.venueDetail[0][key] == "0001-01-01 00:00:00") {
      baseinfo.venueDetail[0][key] = "暂无时间"
    }
    if (baseinfo.venueDetail[0]["matchStartName"] == "暂无赛事" || baseinfo.venueDetail[0]["matchStartName"] == "赛事未开始") {
      color = "#636e72"
    } else {
      color = "#e74c3c"
    }
  }
  return `
    <div>
    <div style="
    height:30px;
    margin:0px;
    display:flex;
    justify-content:space-between; 
    padding:10px;">
      <h3>` +
    baseinfo.venueDetail[0].name +
    `</h3>
    <div style="
    border:1px solid ` + color + `;
    width:70px;
    height:20px;
    line-height:20px;
    text-align:center;
    color:` + color + `;">
    ` +
    baseinfo.venueDetail[0].matchStartName +
    `
    </div>
    </div>

    <div style="height:auto;padding:10px;display:flex;justify-content:space-between;">
      <h4>比赛日程：<h4>
      <button id="gameScheduleClick" style="width:70px;
      height:20px;
      line-height:20px;
      border:1px solid #758bfd;
      color:#758bfd;
      background-color:#f5f6f7;">查看赛程</button>
    </div>

    <div style="height:auto;overflow:hidden;padding:10px;">
      <h4>当前比赛：` +
    baseinfo.venueDetail[0].matchName +
    `<h4>
    </div>
    <div style="height:auto;overflow:hidden;padding:10px;">
      地址：` +
    baseinfo.venueDetail[0].address +
    `
    </div>
    
    <div style="
    display:flex;
    padding:10px;">时间：
      <div>` +
    baseinfo.venueDetail[0].matchStartTime + "&nbsp-&nbsp;" + baseinfo.venueDetail[0].matchEndTime +
    `</div>
    </div>
    <div style="display:flex;justify-content:space-between;padding:10px;">
      <div style=
      "display:flex;
      justify-content:space-between;
      item-align:center;">
        <img id="imgDemo" src=` +
    require("../../../assets/imgHome/dialogIcon/人员.png") +
    ` alt="图片"/>&nbsp;
        <div style="line-height:32px;">医疗点&nbsp;<b style="font-size:18px;">` +
    baseinfo.venueDetail[0].medicalPointNumber + "</b>" +
    `组</div>
      </div>
      <div style="
      display:flex;
      justify-content:space-between;
      item-align:center;">
        <img id="imgDemo" src=` +
    require("../../../assets/imgHome/dialogIcon/救护车.png") +
    ` alt="图片"/>&nbsp;
        <div style="line-height:32px;">救护车&nbsp;<b style="font-size:18px;">` +
    baseinfo.venueDetail[0].ambulanceNumber + "</b>" +
    `辆</div>
      </div>
    </div>
    <div style="display:flex;justify-content:space-between;padding:15px;">
      <button id="medicalGroupClick" style="
      width:70px;
      height:20px;
      line-height:20px;
      border:1px solid #758bfd;
      color:#758bfd;
      background-color:#f5f6f7;">
      医疗点
      </button>
      <button id="ambulanceClick" style="
      width:70px;
      height:20px;
      line-height:20px;
      border:1px solid #758bfd;
      color:#758bfd;
      background-color:#f5f6f7;
      "
      title="单击显示场馆车辆，双击显示车辆弹窗">
      救护车
      </button>
      <button id="drugClick" style="
      width:70px;
      height:20px;
      line-height:20px;
      border:1px solid #758bfd;
      color:#758bfd;
      background-color:#f5f6f7;">
      药品耗材
      </button>
    </div>
  </div>
`
}
// 车辆信息弹窗
function vehicleInfoContent(baseinfo) {
  for (let key in baseinfo) {
    // console.log(baseinfo[key])
    if (baseinfo[key] == null || baseinfo[key] == "") {
      baseinfo[key] = "暂无"
    }
  }
  return `
    <div style="margin:5px;">
      <div>
        <span>车牌号：</span>
        <span>` +
    baseinfo.name +
    `</span>
      </div>
      <div>
        <span>车辆状态：</span>
        <span>` +
    baseinfo.stateName +
    `</span></span>
      </div>
      <div>
        <span>医生：</span>
        <span>` +
    baseinfo.doctor +
    `</span>
      </div>
      <div>
        <span>司机：</span>
        <span>` +
    baseinfo.driver +
    `</span>
      </div>
      <div>
        <span>护士：</span>
        <span>` +
    baseinfo.nurse +
    `</span>
      </div>
      <div>
        <span>担架工：</span>
        <span>` +
    baseinfo.stretcher +
    `</span>
      </div>
      <div>
      <span>车载电话：</span>
      <span>` +
    baseinfo.telephone +
    `</span></span>
    </div>
    <div>
      <span>是否在线：</span>
      <span>` +
    baseinfo.isOnline +
    `</span></span>
    </div>
    <div>
      <span>是否有效：</span>
      <span>` +
    baseinfo.isEffective +
    `</span></span>
    </div>
    </div>
  `
}

//  医疗点图标弹窗
function venueMedicalPointContent(baseinfo) {
  for (let key in baseinfo) {
    // console.log(baseinfo[key])
    if (baseinfo[key] == null || baseinfo[key] == "") {
      baseinfo[key] = "暂无"
    }
  }
  return `
  <div style="margin:5px;">
    <div>
      <span>医疗点名称：</span>
      <span>` +
    baseinfo.name +
    `</span>
    </div>
    <div>
      <span>医疗点类型：</span>
      <span>` +
    baseinfo.type +
    `</span>
    </div>
    <div>
      <span>医生：</span>
      <span> ` +
    baseinfo.doctor +
    `</span>
    </div>
    
    <div>
      <span>护士：</span>
      <span>` +
    baseinfo.nurse +
    `</span></span>
    </div>
  </div>
`
}
export {
  hospitalInfoContent,
  venueContent,
  vehicleInfoContent,
  venueMedicalPointContent
}